/**
 * OrderService.java
 * 
 * Copyright@2015 OVT Inc. All rights reserved. 
 * 
 * Dec 29, 2015
 */
package com.ovt.doorbell.payment.service;

import com.ovt.doorbell.payment.dao.vo.Order;
import com.ovt.doorbell.payment.dao.vo.OrderRequest;
import com.ovt.doorbell.payment.service.exception.ServiceException;

/**
 * OrderService
 * 
 * @Author zhi.liu
 * @Version 1.0
 * @See 
 * @Since [OVT Cloud Platform]/[API] 1.0
 */
public interface OrderService
{
    /**
     * Process user purchase request.
     * 
     * @param orderRequest
     * @return
     */
    Order createOrder(OrderRequest orderRequest) throws ServiceException;

    /**
     * Handle paid success order.
     * 
     * @return
     */
    void onPaidSuccess(String userId, String orderNo) throws ServiceException;
    
    /**
     * Handle refund success order.
     * 
     * @return
     */
    void onRefundSuccess(String userId) throws ServiceException;

}
